-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nodejs] create new weblog for express 5 #3572
base: main
Are you sure you want to change the base?
Conversation
manifests/nodejs.yml
Outdated
@@ -558,84 +563,106 @@ tests/: | |||
Test_Kafka: | |||
'*': irrelevant | |||
express4: v0.1 # real version not known | |||
express5: v0.1 # real version not known |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Versioning is more related to features rather than instrumentation or weblogs. Do you think I should use the same versions as express 4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As express5 is not yet supported, I think that you can't set any version <5.29.0 or <4.53.0 (next release) for any test.
@@ -215,7 +215,7 @@ elif [ "$TARGET" = "agent" ]; then | |||
elif [ "$TARGET" = "nodejs" ]; then | |||
assert_version_is_dev | |||
# NPM builds the package, so we put a trigger file that tells install script to get package from github#master | |||
echo "DataDog/dd-trace-js#master" > nodejs-load-from-npm | |||
echo "DataDog/dd-trace-js#express5" > nodejs-load-from-npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed after review
|
||
WORKDIR /usr/app | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN npm install | ||
RUN npm install "express@^4.17.2" "apollo-server-express@^3.13.0" "express-mongo-sanitize@^2.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as package-lock.json will not work for these dependencies, should we fix the versions?
RUN npm install "express@^4.17.2" "apollo-server-express@^3.13.0" "express-mongo-sanitize@^2.2.0" | |
RUN npm install "[email protected]" "[email protected]" "[email protected]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
ENV NODE_ENV=production | ||
|
||
RUN npm install | ||
RUN npm install "express@^5.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as package-lock.json will not work for these dependencies, should we fix the versions?
RUN npm install "[email protected]"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing_feature
decorator for this test should be addressed to check the new weblog variant for express5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a node expert, but would it be more reliable to have a package/lock per weblog, rather a common one + a dedicated npm install
?
097c3e1
to
3e026f8
Compare
@@ -37,7 +40,10 @@ def test_source_get_reported(self): | |||
""" for use case where only one is reported, we want to keep a test on the one reported """ | |||
self.validate_request_reported(self.requests["GET"]) | |||
|
|||
@missing_feature(weblog_variant="express4", reason="Tainted as request body") | |||
@missing_feature( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is surprising, it goes from weblog_variant == "express4"
to weblog_variant not in ["express4" ...)
. Is it intended ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I will fix this, the feature is currently marked as missing in nodejs.yml
The failing test in nodejs prod is expected as my PR hasn't been merged yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, passing the PR as draft to unstress my noti stack. You can set it back to normal once it's ready to be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some CI failures to fix, probably related to my comment.
Motivation
Express has released a new version, v5, which includes some breaking changes compared to v4. We have a PR ready for review and merging on
dd-trace-js
. Additionally, we need to create a weblog for Express 5 to identify potential breaking changes and ensure our instrumentation remains compatible.Changes
Workflow
codeowners
file quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>]
, double-check that only<language>
is impacted by the changebuild-XXX-image
label is present